package cs4280.ass2.entity;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

public class Member extends User {
	private static final long serialVersionUID = 1L;

	public Member() {
		setType(User.USER_TYPE_MEMBER);
	}
	
	private double loyaltyPoint = 0d;

	public void setLoyaltyPoint(double loyaltyPoint) {
		this.loyaltyPoint = loyaltyPoint;
	}

	public double getLoyaltyPoint() {
		return loyaltyPoint;
	}

	@Override
	public String toString() {
		ToStringBuilder builder = new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE);
		builder.append("id", this.getId());
		builder.append("firstname", this.getFirstName());
		builder.append("lastname", this.getLastName());
		builder.append("login", this.getLogin());
		builder.append("password", this.getPassword());
		builder.append("loyaltyPoint", this.getLoyaltyPoint());
		builder.append("createDate", this.getCreateDate());
		builder.append("createUser", this.getCreateUser());
		builder.append("modifyDate", this.getModifyDate());
		builder.append("modifyUser", this.getModifyUser());

		return builder.toString();
	}
}
